unit rename_image_unit;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ExtCtrls;

type
  Trename_image_title_form = class(TForm)
    image_title_edit: TLabeledEdit;
    image_description_edit: TLabeledEdit;
    ok_button: TButton;
    cancel_button: TButton;
    image_file_edit: TLabeledEdit;
    procedure ok_buttonClick(Sender: TObject);
    procedure cancel_buttonClick(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure image_title_editKeyDown(Sender: TObject; var Key: Word;
      Shift: TShiftState);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  rename_image_title_form: Trename_image_title_form;

implementation

{$R *.dfm}

procedure Trename_image_title_form.ok_buttonClick(Sender: TObject);
begin
  ModalResult := mrOk;
end;

procedure Trename_image_title_form.cancel_buttonClick(Sender: TObject);
begin
  ModalResult := mrCancel;
end;

procedure Trename_image_title_form.FormClose(Sender: TObject;
  var Action: TCloseAction);
begin
  Action := caHide;
end;

procedure Trename_image_title_form.image_title_editKeyDown(Sender: TObject;
  var Key: Word; Shift: TShiftState);
begin
  if (Key = 13) then ok_buttonClick(Sender);
  if (Key = 27) then cancel_buttonClick(Sender);
end;

end.
